<?php
$currentDir = dirname(__FILE__);

/* Directories */
define('_PT_ROOT_DIR_', realpath($currentDir.'/..'));


function bqSQL($string)
{
	return str_replace('`', '\`', pSQL($string));
}

function pSQL($string, $htmlOK = false)
{
	static $db = false;
	if (!$db)
		$db = DbAbstract::getInstance();

	return $db->escape($string, $htmlOK);
}